

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="pageHead"><title>
	Koders Code Search: SqlParser.java - Java - LGPL
</title><meta name="robots" content="noarchive,index,follow" /><meta name="GOOGLEBOT" content="noarchive,index,follow" /><link href="http://www.koders.com/search/KodersDescriptionOS1_1.xml"  title="Koders search" rel="search" type="application/opensearchdescription+xml" ><link href="http://www.koders.com/search/KodersDescriptionOS1_1Proj.xml"  title="Koders Projects search" rel="search" type="application/opensearchdescription+xml" ><link href="/skins/koders/styles.css" type="text/css" rel="stylesheet" /><!--[if IE]><link href="/skins/koders/iestyles.css" type="text/css" rel="stylesheet" /><![endif]-->
<link href="/Special/Stylesheets/koders.com.css" type="text/css" rel="stylesheet" /> <meta  name="ROBOTS"  content="NOARCHIVE"  /> 
		
	<link href="/skins/koders/home-page.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" language="javascript">
//Copyright (c) 2005-2007 Koders.com,
//All Rights Reserved.
var anchors;
var symbolSegment = 0;
var max = 0;
	
function assignInitial() {
	var codeDiv = document.getElementById("CodeDiv");
	if(codeDiv != null) {
		anchors = codeDiv.getElementsByTagName("a");
		assignR(300);
	}
}

function assignR(max) {
	if(symbolSegment + max >= anchors.length) {
		max = anchors.length - symbolSegment; 
	}
	for(var i = 0; i < max; i++) {
		var temp = "";
		var index = symbolSegment +  i;
		var anchor = anchors[index];

		for(var k = 0; k < anchor.childNodes.length; k++) {
			if(anchor.childNodes[k].data == undefined) {
				temp = temp + anchor.childNodes[k].childNodes[0].data;
			}
			else {
				temp = temp + anchor.childNodes[k].data;
			}
		}
		
		anchors[index].setAttribute("href", "javascript:searchRef('" + temp + "')");
		anchors[index].setAttribute("title", "Search for references of '" + temp + "'");
	}
	
	if(symbolSegment + max < anchors.length) { 
		symbolSegment += max;
		this.setTimeout("assignR(50)", 200);		
	}
	
}

function searchRef(symbol) {
	location = homeUrl + "?s=" + symbol + "&scope=" + projectID + "&la=" + sourceLanguage;
}

function Hide(element) {
	if(element) {
		element.style.visibility = "hidden";
		element.style.display = "none";
	} 
}

function HideBanner() {
	var eleArray = document.getElementsByTagName('div');
	for(var i = 0; i < eleArray.length; i++) {
		if(!eleArray[i] || !eleArray[i].id) {
			continue;
		}

		var id = eleArray[i].id;
		if(id && id.indexOf("RightBanner") != -1){
			Hide(eleArray[i]);
								
			// hide all the iframes nested in the Banner
			var arrIframe = eleArray[i].getElementsByTagName('iframe');
			if(!arrIframe)
				return;
			
			for(var j = 0; j < arrIframe.length; j++) {
				Hide(arrIframe[j]);
			}
		}
	}
}

var dojo;
if(dojo) dojo.addOnLoad(assignInitial);
else window.onload = assignInitial;
</script>
</head>


<body>
		<!-- media header starts -->
<STYLE type=text/css media=all>

@import url( http://media.blackducksoftware.com/koders/styles/koders_interface.css );

</STYLE>







<!-- Style for IE 6 -->

<!--[if gte IE 6]>

<style type="text/css">

#nav_container {

	MARGIN-TOP: -64px;

	FONT-FAMILY: Arial;

	POSITION: absolute;

	right: 25px;

	z-index:1;

}

UL.main_nav LI UL {

	WIDTH: 150px; TOP: 20px; BACKGROUND-COLOR: #e6e6e6

}

UL.main_nav LI UL LI IMG {

	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FLOAT: right; PADDING-BOTTOM: 0px; MARGIN: -10px; WIDTH: 7px; PADDING-TOP: -10px

}

</style>

<![endif]-->



<SCRIPT type=text/javascript>

function urldecode( str ) {
        var histogram = {}, ret = str.toString(), unicodeStr='', hexEscStr='';
    
    var replacer = function(search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    };
    
    // The histogram is identical to the one in urlencode.
    histogram["'"]   = '%27';
    histogram['(']   = '%28';
    histogram[')']   = '%29';
    histogram['*']   = '%2A';
    histogram['~']   = '%7E';
    histogram['!']   = '%21';
    histogram['%20'] = '+';
    histogram['\u00DC'] = '%DC';
    histogram['\u00FC'] = '%FC';
    histogram['\u00C4'] = '%D4';
    histogram['\u00E4'] = '%E4';
    histogram['\u00D6'] = '%D6';
    histogram['\u00F6'] = '%F6';
    histogram['\u00DF'] = '%DF'; 
    histogram['\u20AC'] = '%80';
    histogram['\u0081'] = '%81';
    histogram['\u201A'] = '%82';
    histogram['\u0192'] = '%83';
    histogram['\u201E'] = '%84';
    histogram['\u2026'] = '%85';
    histogram['\u2020'] = '%86';
    histogram['\u2021'] = '%87';
    histogram['\u02C6'] = '%88';
    histogram['\u2030'] = '%89';
    histogram['\u0160'] = '%8A';
    histogram['\u2039'] = '%8B';
    histogram['\u0152'] = '%8C';
    histogram['\u008D'] = '%8D';
    histogram['\u017D'] = '%8E';
    histogram['\u008F'] = '%8F';
    histogram['\u0090'] = '%90';
    histogram['\u2018'] = '%91';
    histogram['\u2019'] = '%92';
    histogram['\u201C'] = '%93';
    histogram['\u201D'] = '%94';
    histogram['\u2022'] = '%95';
    histogram['\u2013'] = '%96';
    histogram['\u2014'] = '%97';
    histogram['\u02DC'] = '%98';
    histogram['\u2122'] = '%99';
    histogram['\u0161'] = '%9A';
    histogram['\u203A'] = '%9B';
    histogram['\u0153'] = '%9C';
    histogram['\u009D'] = '%9D';
    histogram['\u017E'] = '%9E';
    histogram['\u0178'] = '%9F';
 
    for (unicodeStr in histogram) {
        hexEscStr = histogram[unicodeStr]; // Switch order when decoding
        ret = replacer(hexEscStr, unicodeStr, ret); // Custom replace. No regexing
    }
    
    // End with decodeURIComponent, which most resembles PHP's encoding functions
    ret = decodeURIComponent(ret);
 
    return ret;
}

function setsearchterm()
{
  name = "s";
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  document.getElementById('searchbox').value = urldecode(results[1]);

}

function setsearchscope()
{
  name = "scope";
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );

//set the scope by default
  document.getElementById('searchscope').value = results[1];

//if we get told to clear scope, clear it.
  action = "action";
  action = action.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexA = "[\\?&]"+action+"=([^&#]*)";
  var regexAct = new RegExp( regexA );
  var actionresultstemp = regexAct.exec( window.location.href );
  var actionresults = actionresultstemp[1];

if (actionresults.match("ClearScope"))
{
  document.getElementById('searchscope').value = "";
}
}

function setsearchlang()
{
  name = "la";
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  document.getElementById('__ctl04_la').value = results[1];

}

function setsearchlic()
{
  name = "li";
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  document.getElementById('__ctl04_li').value = results[1];

}


var linkPrefix = "http://www.koders.com/ks/search/KodersMozillaPlugin_";

function AddKodersSearch(name)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
	var pluginUrl = linkPrefix + name + ".src"; 
	var imageUrl  = linkPrefix + name + ".png"; 
	//alert(pluginUrl + "\n" + imageUrl);
	
    window.sidebar.addSearchEngine(
	  pluginUrl,
      imageUrl,
      name,
      "Software Development");
  }
  else
  {
	alert("Your browser is not currently supported. Please contact support@koders.com if you would like further assistence.");
  }
}

function TriggerAdd() {
	var selectBox = document.getElementById('MozillaPluginSelect');
	var selectedValue = selectBox.options[selectBox.selectedIndex].value + "";
	if(selectedValue.length > 0) {
		AddKodersSearch(selectedValue);
	}
}
    

function jsinit() {
setsearchterm();
setsearchlang();
setsearchlic();
setsearchscope();
init_sBG(true);
}

window.onload = jsinit

					</SCRIPT>

<!-- following two given for nav --><!-- <script src='/themes/blackduck/globalScript.js' type=text/javascript></script> -->

<SCRIPT 

src="http://media.blackducksoftware.com/koders/scripts/twoLevelScript.js" 

type=text/javascript></SCRIPT>

<LINK title="rss 2.0" href="/rss.xml" type=application/rss+xml rel=alternate>

<META content="MSHTML 6.00.2900.3527" name=GENERATOR></HEAD>

<BODY>

<TABLE id=container cellSpacing=0 cellPadding=0 width="100%" align=center 

  border=0><TBODY>

  <TR>

    <TD vAlign=top width="100%" height=59>

      <DIV class=header_row>

      <TABLE class=header_row id=header_table cellSpacing=0 cellPadding=0 

      width="100%" height=59 border=0>

        <TBODY>

        <TR>

          <TD width=175 rowSpan=2><A 

            id=duck_home_link href="/"><IMG 

            height=59 width=175 alt="" 

            src="http://media.blackducksoftware.com/koders/images/koders_logo_sm.gif" 

            ></A> </TD>

          <TD height=59>

            <DIV id=search_field>



            <form action="/default.aspx" method="get"> 

			<INPUT value=Search

            name=s id="searchbox" size="35" maxlength="100"> <INPUT type=image 

            src="http://media.blackducksoftware.com/koders/images/search_carat_bl.gif" 

            name=search><br>

			<select name="la" id="__ctl04_la" class="language_select_box">
	<option value="*">All Languages</option>
	<option value="ActionScript">ActionScript</option>
	<option value="Ada">Ada</option>
	<option value="ASP">ASP</option>
	<option value="ASP.NET">ASP.NET</option>
	<option value="Assembler">Assembler</option>
	<option value="C">C</option>
	<option value="C#">C#</option>
	<option value="Cpp">C++</option>
	<option value="Cobol">Cobol</option>
	<option value="ColdFusion">ColdFusion</option>
	<option value="Delphi">Delphi</option>
	<option value="Eiffel">Eiffel</option>
	<option value="Erlang">Erlang</option>
	<option value="Fortran">Fortran</option>
	<option value="Java">Java</option>
	<option value="JavaScript">JavaScript</option>
	<option value="JSP">JSP</option>
	<option value="Lisp">Lisp</option>
	<option value="Lua">Lua</option>
	<option value="Mathematica">Mathematica</option>
	<option value="Matlab">Matlab</option>
	<option value="ObjectiveC">ObjectiveC</option>
	<option value="Perl">Perl</option>
	<option value="PHP">PHP</option>
	<option value="Prolog">Prolog</option>
	<option value="Python">Python</option>
	<option value="Ruby">Ruby</option>
	<option value="Scheme">Scheme</option>
	<option value="Smalltalk">Smalltalk</option>
	<option value="SQL">SQL</option>
	<option value="Tcl">Tcl</option>
	<option value="VB">VB</option>
	<option value="VB.NET">VB.NET</option>
</select>
        <select name="li" id="__ctl04_li" class="select_box">
	<option value="*">All Licenses</option>
	<option value="AFL">Academic Free License</option>
	<option value="AL20">Apache License, Version 2.0</option>
	<option value="ASL">Apache Software License</option>
	<option value="APSL">Apple Public Source License</option>
	<option value="BSD">BSD License</option>
	<option value="CPL">Common Public License</option>
	<option value="EPL10">Eclipse Public License v1.0</option>
	<option value="GTPL">Globus Toolkit Public License</option>
	<option value="GPL">GNU General Public License v1 v2 v3</option>
	<option value="LGPL">GNU Lesser General Public License</option>
	<option value="IBMPL">IBM Public License</option>
	<option value="IOSL">Intel Open Source License</option>
	<option value="MSCL">Microsoft Community License</option>
	<option value="MSPL">Microsoft Permissive License</option>
	<option value="MSRL">Microsoft Reference License</option>
	<option value="MSVSSDK">Microsoft Visual Studio SDK License</option>
	<option value="MITD">MIT Derived License</option>
	<option value="MPL10">Mozilla Public License Version 1.0</option>
	<option value="MPL11">Mozilla Public License Version 1.1</option>
	<option value="NPL10">Netscape Public License, Version 1.0</option>
	<option value="NPL11">Netscape Public License, Version 1.1</option>
	<option value="OSL">Open Software License</option>
	<option value="PHPL">PHP License</option>
	<option value="PSFL">Python Software Foundation License</option>
	<option value="SL">Sleepycat Software Product License</option>
	<option value="SPL">Sun Public License</option>
	<option value="W3C">W3C Software License</option>
	<option value="ZLL">zlib/libpng License</option>
	<option value="ZPL">Zope Public License</option>
</select>

	    <input type="hidden" name="scope" id="searchscope" value="">

</FORM></DIV></TD></TR>

        <TR><TD height=0>

            <DIV id=nav_container>

            <UL class=main_nav>

              <LI class=top_level><A 
              href="http://corp.koders.com/about/"><IMG class=rollovers 
              id=learn_rollover alt="" 
              src="http://media.blackducksoftware.com/koders/images/about_button_top.gif"></A> 

              <UL>
                <LI>
                  <div align="left"><A title="About Koders.com" 
                href="http://corp.koders.com/about/">About</A> </div>
                </LI>
                <LI>
                  <div align="left"><A title="Contact Us" 
                href="http://corp.koders.com/about#Contact"> 
                  Contact</A> </div>
                </LI><LI>
                  <div align="left"><A title="Site Map" 
                href="http://corp.koders.com/sitemap"> 
                  Site Map</A> </div>
                </LI>
              </ul></li>
			  
              <LI class=top_level><A 
              href="http://corp.koders.com/resources"><IMG 
              class=rollovers id=resources_rollover alt="" 
              src="http://media.blackducksoftware.com/koders/images/resources_button_top.gif"></A> 

              <UL>
                <LI>
                  <div align="left"><A title="Overview" 
                href="http://corp.koders.com/resources"> 
                  Overview</A>                    </div>
                </LI>
                <LI>
                  <div align="left"><A title="Open Source License Info" 
                href="http://corp.koders.com/resources/license-info">License Info</A> 
                  </div>
                </LI><LI>
                  <div align="left"><A title="Top Searches" 
                href="http://corp.koders.com/resources/top-searches">Top Searches</A> 
                  </div>
                </LI><LI>
                  <div align="left"><A title="AD Search" 
                href="http://corp.koders.com/resources/widgets">Add search to your site</A> 
                  </div>
                </LI><LI>
                  <div align="left"><A title="feeback" 
                href="http://corp.koders.com/resources/feedback">Feedback</A> 
                  </div>
                </LI>
	</ul></li>
              <LI class=top_level><A 
              href="http://corp.koders.com/downloads"><IMG 
              class=rollovers id=products_rollover alt="" 
              src="http://media.blackducksoftware.com/koders/images/community_button_top.gif"></A> 

              <UL>
                <LI>
                  <div align="left"><A title="Overview" 
                href="http://corp.koders.com/downloads"> 
                  Overview</A> </div>
                </LI>
                <LI>
                  <div align="left"><A title="Demo" 
                href="http://corp.koders.com/downloads/demo">Demo 
                  </A> </div>
                </LI><LI>
                  <div align="left"><A title="Download Plugins" 
                href="http://corp.koders.com/downloads/plugins">Plugins</A> </div>
                </LI><LI>
                  <div align="left"><A title="Download Plugins" 
                href="http://corp.koders.com/downloads/plugins#IDE">IDE Plugins</A> </div>
                </LI><LI>
                  <div align="left"><A title="Download Plugins" 
                href="http://corp.koders.com/downloads/plugins#browser">Browser Plugins</A> </div>
                </LI>
              </ul></li>
              <LI class=top_level><A 
              href="http://corp.koders.com/support/overview"><IMG class=rollovers 
              id=news_rollover alt="" 
              src="http://media.blackducksoftware.com/koders/images/support_button_top.gif"></A> 

              <UL>
                <LI>
                  <div align="left"><A title="Customer Support" 
                href="http://corp.koders.com/support/overview">Overview</A> </div>
                </LI>
                <LI>
                  <div align="left"><A title="Getting Started Guide" 
                href="http://corp.koders.com/support/getting-started">Getting Started Guide</A> </div>
                </LI><LI>
                  <div align="left"><A title="Search Examples" 
                href="http://corp.koders.com/support/getting-started#search">Search Examples</A> </div>
                </LI>
                <LI>
                  <div align="left"><A title="Contact Support" 
                href="http://corp.koders.com/support/contact-support">Contact Support</A> </div>
                </LI>
                
		</ul></li>
              <LI class=top_level><A 
              href="http://www.blackducksoftware.com/" target="_blank"><IMG 
              class=rollovers id=blackduck_rollover alt="" 
              src="http://media.blackducksoftware.com/koders/images/bds_button_top.gif"></A> 

              <UL>
                <LI>
                  <div align="left"><A 
                href="http://www.blackducksoftware.com/" title="An overview of Black Duck Software" target="_blank">About Black Duck Software</A></div>
                </LI>
                <LI>
                  <div align="left"><A 
                href="http://www.blackducksoftware.com/black-duck-suite" title="The Black Duck Suite" target="_blank">The Black Duck Suite</A> </div>
                </LI>
                <LI>
                  <div align="left"><A 
                href="http://www.blackducksoftware.com/oss" 
                title="OSS Page" target="_blank">Open Source Resource Center</A> </div>
                </LI>
                <LI>
                  <div align="left"><A 
                href="http://www.blackducksoftware.com/resources" title="Black Duck Knowledge Center" target="_blank">Black Duck Knowledge Center</A> </div>
                </LI><LI>
                  <div align="left"><A 
                href="http://www.blackducksoftware.com/about/contact" title="Contact" target="_blank">Contact</A> </div>
                </LI>
              </UL></LI>
              <LI class=top_level><A 
              href="http://corp.koders.com/submitproject"><IMG 
              src="http://media.blackducksoftware.com/koders/images/submit_button_top.gif" alt="" name="company_rollover" border="0" class=rollovers 
              id=company_rollover></A></LI>
</UL></DIV></TD>

        </TR></TBODY></TABLE></DIV></TD></TD></TR>

		

  <TR>

    <TD vAlign=top align=left height=7 bgcolor=#006699 colSpan=2></TD></TR>

  

  

  </TBODY></TABLE>

   <div align="center"><a href="http://www.blackducksoftware.com/code-sight/download" target="_blank"><img src="http://media.blackducksoftware.com/koders/header/ads/free_728x45.gif" alt="A" vspace="10" border="0"></a>

   </div>


<!-- media header ends -->
	
 
    <form name="FRM" method="post" action="kv.aspx?fid=875376E771EE4511E298CB10723A5447A9D6D587" id="FRM">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTAwNjE0MDQ3Mw9kFgYCAQ9kFgICBg8PFgQeBkZpbGVJRAKX4YYFHglQcm9qZWN0SUQCwlFkZAIHD2QWBAIDDxYCHgdWaXNpYmxlaGQCBw8PFgIfAmdkFgpmDw8WBB4ISW1hZ2VVcmwFFC9pbWFnZXMvZG93bmxvYWQuZ2lmHgdUb29sVGlwBRdEb3dubG9hZCBTcWxQYXJzZXIuamF2YWRkAgIPFgIeC18hSXRlbUNvdW50AgEWAmYPZBYCZg8VBQ5TcWxQYXJzZXIuamF2YQRKYXZhEUxpY2Vuc2U6IExHUEw8YnI+J0NvcHlyaWdodDogKEMpIDIwMDItMjAwMyAgVG9nZXRoZXIKPGJyPghMT0M6IDMwOWQCAw8WAh8FAgEWAmYPZBYGZg8VAvgBRW5oeWRyYSBPY3RvcHVzIGlzIGFuIGFkdmFuY2VkIHJlbGF0aW9uYWwgRXh0cmFjdGlvbi9UcmFuc2Zvcm1hdGlvbi9Mb2FkaW5nIHRvb2wuIEl0IGNhbiBjb25uZWN0IHRvIEpEQkMgZGF0YSBzb3VyY2VzIGFuZCBwZXJmb3JtIHRyYW5zZm9ybWF0aW9ucyBkZWZpbmVkIGluIFhNTCBkZWZpbml0aW9ucy4gSkRCQyBkcml2ZXJzIGZvciBDU1YgYW5kIFhNTCBhcmUgaW5jbHVkZWQuIE9jdG9wdXMgc3VwcG9ydHMgQW50IGFuZCBKVW5pdC43L2luZm8uYXNweD9jPVByb2plY3RJbmZvJnBpZD1LQzcyUjlSVDhOM1daNk1WOFY3TTI5UVo2QWQCAQ9kFgJmDxUBGEVuaHlkcmEgT2N0b3B1cyhvY3RvcHVzKWQCAg8VAg9PYmplY3RXZWIgRm9yZ2UDY3ZzZAIFD2QWAmYPZBYGAgEPDxYCHgtOYXZpZ2F0ZVVybAU3L2luZm8uYXNweD9jPVByb2plY3RJbmZvJnBpZD1LQzcyUjlSVDhOM1daNk1WOFY3TTI5UVo2QWQWAmYPDxYEHwMFEi9pbWFnZXMvZm9sZGVyLmdpZh8EBWNPYmplY3RXZWIgRm9yZ2Vcb1xvY3RvcHVzXG9jdG9wdXNcT2N0b3B1c1xPY3RvcHVzLXNyY1xtb2R1bGVzXE9jdG9wdXNcc3JjXG9yZ1x3ZWJkb2N3Zlx1dGlsXGxvYWRlclxkZAIDDw8WBB4EVGV4dAUeLi4uY1xvcmdcd2ViZG9jd2ZcdXRpbFxsb2FkZXJcHwQFY09iamVjdFdlYiBGb3JnZVxvXG9jdG9wdXNcb2N0b3B1c1xPY3RvcHVzXE9jdG9wdXMtc3JjXG1vZHVsZXNcT2N0b3B1c1xzcmNcb3JnXHdlYmRvY3dmXHV0aWxcbG9hZGVyXGRkAgUPFgIfBQIlZAIHDxYCHwJoZAIJDxYCHwcFowM8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQp2YXIgZ2FKc0hvc3QgPSAoKCJodHRwczoiID09IGRvY3VtZW50LmxvY2F0aW9uLnByb3RvY29sKSA/ICJodHRwczovL3NzbC4iIDogImh0dHA6Ly93d3cuIik7DQpkb2N1bWVudC53cml0ZSh1bmVzY2FwZSgiJTNDc2NyaXB0IHNyYz0nIiArIGdhSnNIb3N0ICsgImdvb2dsZS1hbmFseXRpY3MuY29tL2dhLmpzJyB0eXBlPSd0ZXh0L2phdmFzY3JpcHQnJTNFJTNDL3NjcmlwdCUzRSIpKTsNCjwvc2NyaXB0Pg0KPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KdmFyIHBhZ2VUcmFja2VyID0gX2dhdC5fZ2V0VHJhY2tlcigiVUEtMTQ1MDQ4MC0zIik7DQpwYWdlVHJhY2tlci5faW5pdERhdGEoKTsNCnBhZ2VUcmFja2VyLl90cmFja1BhZ2V2aWV3KCk7DQo8L3NjcmlwdD4NCmQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFGktvZGV2aWV3ZXIxJERvd25sb2FkQnV0dG9u" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['FRM'];
if (!theForm) {
    theForm = document.FRM;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/WebResource.axd?d=BbU382PrwPzVOMaEV8Aw33RUu5R8xTRFb7Bmnp5-UFW_Yp0txj8CwwBu5YbpsmvieCrya0XtRTcDs5CvM1Eg3hySZ0c1&amp;t=634605330834856163" type="text/javascript"></script>


<script src="/ScriptResource.axd?d=c84hyYSJc9zBItzEAATzGWkhHemXADgLH9H-8WbFVWNiSPnYwFD_a8ocdGeLTEUnk_fzz3Dx7b4w0a-GXtkp3k373WOWMEdmEBLxJsp1fLSp-m6oHcuuo-H3ZQgArxkzAsyblg2&amp;t=633234917480000000" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=QRroTVdKrWzwg8U008la_Ju0lr-c2uCNuvk_kLN8hTsHB4ANcGhdX53Q-uJEP5bwKMJfNkOgIwtnjCnHOwj0Vl5j7-_D3LYkGkm37iTDFj_iRcTmwZqxigBOV1jr1XU4Tj3bPg2&amp;t=633234917480000000" type="text/javascript"></script>
<script src="/ws/1.0/account/mailinglist/default.asmx/js" type="text/javascript"></script>
        <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl09$scriptManager', document.getElementById('FRM'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>

        
        
        <div id="leaderboard" style="">
            <center>
				
<!-- Media Server Begin: 728x90 -->

<!-- Media Server End: 728x90 -->
               
            </center>
		</div>
        
        <div class="kodeViewerContDiv">
            
<!-- <div class="SidePadding" align="left"> -->
<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
		<td>
			<table id="Table2" cellspacing="5" width="100%" border="0">
				<tr>
					<td class="info_panel" valign="top">
						<table id="Table3" border="0">
							<tr>
								<td valign="middle" align="center" width="60">
									<input type="image" name="Kodeviewer1$DownloadButton" id="Kodeviewer1_DownloadButton" title="Download SqlParser.java" src="/images/download.gif" style="border-width:0px;" />
									<a id="Kodeviewer1_LinkButton1" href="javascript:__doPostBack('Kodeviewer1$LinkButton1','')">download</a>
								</td>
								<td>
											<b>
												SqlParser.java
											</b>
											<br>
											Language: <b>
												Java
											</b>
											<br>
											License: LGPL<br>
											Copyright: (C) 2002-2003  Together
<br>
											LOC: 309
											<br>
										</td>
							</tr>
						</table>
					</td>
					<td class="kodeviewer_info_panel" valign="top" width="200">
								<b>Project Info</b><br>
								<a title='Enhydra Octopus is an advanced relational Extraction/Transformation/Loading tool. It can connect to JDBC data sources and perform transformations defined in XML definitions. JDBC drivers for CSV and XML are included. Octopus supports Ant and JUnit.' href='/info.aspx?c=ProjectInfo&pid=KC72R9RT8N3WZ6MV8V7M29QZ6A'>
									<b>
										<span id="Kodeviewer1_ProjectView_ctl00_Label2">Enhydra Octopus(octopus)</span></b></a>
								<br>
								Server:
								ObjectWeb Forge
								<br>
								Type:
								cvs
							
						
						
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<style type="text/css"> 
.RightBanner { Z-INDEX: 2; RIGHT: 25px; FLOAT: right; WIDTH: 160px; POSITION: absolute; HEIGHT: 600px } 
</style>

	<div id="Kodeviewer1_RightBanner" class="RightBanner" style="display:none">
<div style="MARGIN-BOTTOM: 2px" align="center">[<a style="FONT-SIZE: smaller" 
href="javascript:HideBanner();">Show Code</a>] </div>
<div>

<!-- Media Server Begin: 160x600 -->

<!-- Media Server End: 160x600 -->
<br/><br/><br/>
<!-- Media Server Begin: 160x602 -->

<!-- Media Server End: 160x602 -->
<br/><br/><br/>
<!-- Media Server Begin: 160x603 -->

<!-- Media Server End: 160x603 -->
</div>
<div style="MARGIN-TOP: 2px" align="center">[<a style="FONT-SIZE: smaller" 
href="javascript:HideBanner();">Show Code</a>] </div></div>

<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
		<td height="100%">
			<table id="Table9" cellspacing="8" cellpadding="0" border="0" style="height:100%">
				<tr>
					<td valign="top">
						
						
<table id="Table1" style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid; BORDER-COLLAPSE: collapse"
	cellspacing="0" cellpadding="3" border="0" width="100%">
	<tbody>
		<tr>
			<th class="exp_header" align="left">
				<a id="Kodeviewer1_ctl00_hyFicon" href="/info.aspx?c=ProjectInfo&amp;pid=KC72R9RT8N3WZ6MV8V7M29QZ6A"><img id="Kodeviewer1_ctl00_ficon" title="ObjectWeb Forge\o\octopus\octopus\Octopus\Octopus-src\modules\Octopus\src\org\webdocwf\util\loader\" src="/images/folder.gif" align="left" style="border-width:0px;" /></a>
				<b>
					<span id="Kodeviewer1_ctl00_Label1" title="ObjectWeb Forge\o\octopus\octopus\Octopus\Octopus-src\modules\Octopus\src\org\webdocwf\util\loader\">...c\org\webdocwf\util\loader\</span>
				</b>
				<br/>
			</th>
		</tr>
		<tr>
			<td class="exp_items">
				
						&nbsp;&nbsp;
					<a title="BufferOctopusClass.java" href="/java/fid01CDFE68AEBA5E79EA8B5AE620067A1656045DB5.aspx">BufferOctopusClass.java<br></a>
						&nbsp;&nbsp;
					<a title="Cache.java" href="/java/fidDC3082034BA164C8137DBAF36E373C358050FE3C.aspx">Cache.java<br></a>
						&nbsp;&nbsp;
					<a title="CheckRowCache.java" href="/java/fidB890C253A19E71C1C153A65A27DFA7E31659E46F.aspx">CheckRowCache.java<br></a>
						&nbsp;&nbsp;
					<a title="CheckType.java" href="/java/fidFCBC15BD17C30CB596578FC79078653D5EA05B80.aspx">CheckType.java<br></a>
						&nbsp;&nbsp;
					<a title="ConfigReader.java" href="/java/fid72CD1EC040EA0F1A55181EAC53F12FA7A1A5936C.aspx">ConfigReader.java<br></a>
						&nbsp;&nbsp;
					<a title="CounterColumns.java" href="/java/fid628E4CE9321BD5A6BC83202DBA925092AAB2CCD6.aspx">CounterColumns.java<br></a>
						&nbsp;&nbsp;
					<a title="DataCleaning.java" href="/java/fid1E46D80D3AD8221AB039B9512EC28E7BD0A3031C.aspx">DataCleaning.java<br></a>
						&nbsp;&nbsp;
					<a title="DataTransmition.java" href="/java/fid113E3B6FEBF1B5E1966821E56AF4B86D980CEEB0.aspx">DataTransmition.java<br></a>
						&nbsp;&nbsp;
					<a title="DBConnectionManager.java" href="/java/fidD249D5E511F66CD485621C245933AC207B4D3F6C.aspx">DBConnectionManager.java<br></a>
						&nbsp;&nbsp;
					<a title="ImportDefinitionElement.java" href="/java/fidFBE8BBC5B2A46CDADAA0B97F0706ECF74F3ED156.aspx">...tDefinitionElement.java<br></a>
						&nbsp;&nbsp;
					<a title="InsertRowQuerySet.java" href="/java/fid7BFB1FA66B7D2DC02AFC229A0159FEBD2B05DC53.aspx">InsertRowQuerySet.java<br></a>
						&nbsp;&nbsp;
					<a title="JdbcParametersElement.java" href="/java/fid8F17BE261060FE8DBB952E0A9AE246D5CA23AFC6.aspx">JdbcParametersElement.java<br></a>
						&nbsp;&nbsp;
					<a title="LoadAllSourceData.java" href="/java/fid20ED907CD13C72B1DE9D70285129968E860B14F7.aspx">LoadAllSourceData.java<br></a>
						&nbsp;&nbsp;
					<a title="Loader.java" href="/java/fidFE3D81475DB26D8A661E3970370341691DBD718B.aspx">Loader.java<br></a>
						&nbsp;&nbsp;
					<a title="LoaderException.java" href="/java/fid0BFC82CF0D943548685F41E0BC7B3644434C628E.aspx">LoaderException.java<br></a>
						&nbsp;&nbsp;
					<a title="LoaderJobAttrReader.java" href="/java/fid664699BCA63EF67DF7C2CDE4830E23622D5FA92C.aspx">LoaderJobAttrReader.java<br></a>
						&nbsp;&nbsp;
					<a title="LoaderXIncluder.java" href="/java/fid70891DC7C2D449671FCBACB0CF0DF62E9C39A490.aspx">LoaderXIncluder.java<br></a>
						&nbsp;&nbsp;
					<a title="LoadVariable.java" href="/java/fidB326AF64C4D12C1149E576F3449868F54D7B2052.aspx">LoadVariable.java<br></a>
						&nbsp;&nbsp;
					<a title="LocationOfException.java" href="/java/fidD552F6B55D6F846F05F056D1FA73657F39C52F2E.aspx">LocationOfException.java<br></a>
						&nbsp;&nbsp;
					<a title="OctopusClassLoader.java" href="/java/fidBC43C9AAB154106F2F44241965CCC4449D691267.aspx">OctopusClassLoader.java<br></a>
						&nbsp;&nbsp;
					<a title="OctopusEntityResolver.java" href="/java/fid37A0377DD10D3F644D8DE5FF35B80F660AB61F0C.aspx">OctopusEntityResolver.java<br></a>
						&nbsp;&nbsp;
					<a title="OctopusValidator.java" href="/java/fid2DF08339FC281115C450F89C22A75AA09576BF02.aspx">OctopusValidator.java<br></a>
						&nbsp;&nbsp;
					<a title="OctopusXMLUtil.java" href="/java/fid8E5F25C3B34B3576771F89D374E1F1DFAD86ACCC.aspx">OctopusXMLUtil.java<br></a>
						&nbsp;&nbsp;
					<a title="ParseLoggerParam.java" href="/java/fidFE54C20072A37264D9A4D693091555AEA61A37AF.aspx">ParseLoggerParam.java<br></a>
						&nbsp;&nbsp;
					<a title="QueryConstantSet.java" href="/java/fid1243A7A93312FBD12F7E8A6A14222E98E7402A64.aspx">QueryConstantSet.java<br></a>
						&nbsp;&nbsp;
					<a title="QueryInsertRowCt.java" href="/java/fidA06EFE76C5417FB55C9B539101EF45141002F1A3.aspx">QueryInsertRowCt.java<br></a>
						&nbsp;&nbsp;
					<a title="QueryRelationSet.java" href="/java/fidDB4CE41B1362B4782715580F68BC1200513A7A2B.aspx">QueryRelationSet.java<br></a>
						&nbsp;&nbsp;
					<a title="QuerySet.java" href="/java/fid3A323E99BE5FAC5C725C7B6AB47BCC066C9F0BED.aspx">QuerySet.java<br></a>
						&nbsp;&nbsp;
					<a title="QueryUpdateSet.java" href="/java/fid4A3E775F3ECD721558FDC017BAD722DDCEE42DA0.aspx">QueryUpdateSet.java<br></a>
						&nbsp;&nbsp;
					<a title="QueryWhereSet.java" href="/java/fidBC0417CED033D55024B40523F7665A5667E34C9E.aspx">QueryWhereSet.java<br></a>
						&nbsp;&nbsp;
					<a title="RelationsCache.java" href="/java/fid4F2DFB5A421DFAF00B2F4629632D5DBFE37E21E7.aspx">RelationsCache.java<br></a>
						&nbsp;&nbsp;
					<a title="ReturnCode.java" href="/java/fid6273D8FC68C8B563D1738A251440BA9D74E9B5B0.aspx">ReturnCode.java<br></a>
						&nbsp;&nbsp;
					<a title="SqlElement.java" href="/java/fidE70A2BDA8A6F106B36B149FAFD2EF9D09EFD1976.aspx">SqlElement.java<br></a>
						&nbsp;&nbsp;
					<a title="SqlParser.java" href="/java/fid875376E771EE4511E298CB10723A5447A9D6D587.aspx">SqlParser.java<br></a>
						&nbsp;&nbsp;
					<a title="TimeWatch.java" href="/java/fidCB8904756D345E35B2C59593DF4E481873EB3590.aspx">TimeWatch.java<br></a>
						&nbsp;&nbsp;
					<a title="ToAndFromHex.java" href="/java/fidD7341916301061E14C50364D7837B3598B961AEA.aspx">ToAndFromHex.java<br></a>
						&nbsp;&nbsp;
					<a title="Utils.java" href="/java/fid55F44943E9CDF50A7AB3F5D0BA56F17E6FE92FE8.aspx">Utils.java<br></a>
			</td>
		</tr>
	</tbody>
</table>
<br/>

						


						
					</td>
					<td valign="top">
						<div>
							<pre id='kodeViewerLineNumbers'><a href="#L1" name="L1">1</a><br/><a href="#L2" name="L2">2</a><br/><a href="#L3" name="L3">3</a><br/><a href="#L4" name="L4">4</a><br/><a href="#L5" name="L5">5</a><br/><a href="#L6" name="L6">6</a><br/><a href="#L7" name="L7">7</a><br/><a href="#L8" name="L8">8</a><br/><a href="#L9" name="L9">9</a><br/><a href="#L10" name="L10">10</a><br/><a href="#L11" name="L11">11</a><br/><a href="#L12" name="L12">12</a><br/><a href="#L13" name="L13">13</a><br/><a href="#L14" name="L14">14</a><br/><a href="#L15" name="L15">15</a><br/><a href="#L16" name="L16">16</a><br/><a href="#L17" name="L17">17</a><br/><a href="#L18" name="L18">18</a><br/><a href="#L19" name="L19">19</a><br/><a href="#L20" name="L20">20</a><br/><a href="#L21" name="L21">21</a><br/><a href="#L22" name="L22">22</a><br/><a href="#L23" name="L23">23</a><br/><a href="#L24" name="L24">24</a><br/><a href="#L25" name="L25">25</a><br/><a href="#L26" name="L26">26</a><br/><a href="#L27" name="L27">27</a><br/><a href="#L28" name="L28">28</a><br/><a href="#L29" name="L29">29</a><br/><a href="#L30" name="L30">30</a><br/><a href="#L31" name="L31">31</a><br/><a href="#L32" name="L32">32</a><br/><a href="#L33" name="L33">33</a><br/><a href="#L34" name="L34">34</a><br/><a href="#L35" name="L35">35</a><br/><a href="#L36" name="L36">36</a><br/><a href="#L37" name="L37">37</a><br/><a href="#L38" name="L38">38</a><br/><a href="#L39" name="L39">39</a><br/><a href="#L40" name="L40">40</a><br/><a href="#L41" name="L41">41</a><br/><a href="#L42" name="L42">42</a><br/><a href="#L43" name="L43">43</a><br/><a href="#L44" name="L44">44</a><br/><a href="#L45" name="L45">45</a><br/><a href="#L46" name="L46">46</a><br/><a href="#L47" name="L47">47</a><br/><a href="#L48" name="L48">48</a><br/><a href="#L49" name="L49">49</a><br/><a href="#L50" name="L50">50</a><br/><a href="#L51" name="L51">51</a><br/><a href="#L52" name="L52">52</a><br/><a href="#L53" name="L53">53</a><br/><a href="#L54" name="L54">54</a><br/><a href="#L55" name="L55">55</a><br/><a href="#L56" name="L56">56</a><br/><a href="#L57" name="L57">57</a><br/><a href="#L58" name="L58">58</a><br/><a href="#L59" name="L59">59</a><br/><a href="#L60" name="L60">60</a><br/><a href="#L61" name="L61">61</a><br/><a href="#L62" name="L62">62</a><br/><a href="#L63" name="L63">63</a><br/><a href="#L64" name="L64">64</a><br/><a href="#L65" name="L65">65</a><br/><a href="#L66" name="L66">66</a><br/><a href="#L67" name="L67">67</a><br/><a href="#L68" name="L68">68</a><br/><a href="#L69" name="L69">69</a><br/><a href="#L70" name="L70">70</a><br/><a href="#L71" name="L71">71</a><br/><a href="#L72" name="L72">72</a><br/><a href="#L73" name="L73">73</a><br/><a href="#L74" name="L74">74</a><br/><a href="#L75" name="L75">75</a><br/><a href="#L76" name="L76">76</a><br/><a href="#L77" name="L77">77</a><br/><a href="#L78" name="L78">78</a><br/><a href="#L79" name="L79">79</a><br/><a href="#L80" name="L80">80</a><br/><a href="#L81" name="L81">81</a><br/><a href="#L82" name="L82">82</a><br/><a href="#L83" name="L83">83</a><br/><a href="#L84" name="L84">84</a><br/><a href="#L85" name="L85">85</a><br/><a href="#L86" name="L86">86</a><br/><a href="#L87" name="L87">87</a><br/><a href="#L88" name="L88">88</a><br/><a href="#L89" name="L89">89</a><br/><a href="#L90" name="L90">90</a><br/><a href="#L91" name="L91">91</a><br/><a href="#L92" name="L92">92</a><br/><a href="#L93" name="L93">93</a><br/><a href="#L94" name="L94">94</a><br/><a href="#L95" name="L95">95</a><br/><a href="#L96" name="L96">96</a><br/><a href="#L97" name="L97">97</a><br/><a href="#L98" name="L98">98</a><br/><a href="#L99" name="L99">99</a><br/><a href="#L100" name="L100">100</a><br/><a href="#L101" name="L101">101</a><br/><a href="#L102" name="L102">102</a><br/><a href="#L103" name="L103">103</a><br/><a href="#L104" name="L104">104</a><br/><a href="#L105" name="L105">105</a><br/><a href="#L106" name="L106">106</a><br/><a href="#L107" name="L107">107</a><br/><a href="#L108" name="L108">108</a><br/><a href="#L109" name="L109">109</a><br/><a href="#L110" name="L110">110</a><br/><a href="#L111" name="L111">111</a><br/><a href="#L112" name="L112">112</a><br/><a href="#L113" name="L113">113</a><br/><a href="#L114" name="L114">114</a><br/><a href="#L115" name="L115">115</a><br/><a href="#L116" name="L116">116</a><br/><a href="#L117" name="L117">117</a><br/><a href="#L118" name="L118">118</a><br/><a href="#L119" name="L119">119</a><br/><a href="#L120" name="L120">120</a><br/><a href="#L121" name="L121">121</a><br/><a href="#L122" name="L122">122</a><br/><a href="#L123" name="L123">123</a><br/><a href="#L124" name="L124">124</a><br/><a href="#L125" name="L125">125</a><br/><a href="#L126" name="L126">126</a><br/><a href="#L127" name="L127">127</a><br/><a href="#L128" name="L128">128</a><br/><a href="#L129" name="L129">129</a><br/><a href="#L130" name="L130">130</a><br/><a href="#L131" name="L131">131</a><br/><a href="#L132" name="L132">132</a><br/><a href="#L133" name="L133">133</a><br/><a href="#L134" name="L134">134</a><br/><a href="#L135" name="L135">135</a><br/><a href="#L136" name="L136">136</a><br/><a href="#L137" name="L137">137</a><br/><a href="#L138" name="L138">138</a><br/><a href="#L139" name="L139">139</a><br/><a href="#L140" name="L140">140</a><br/><a href="#L141" name="L141">141</a><br/><a href="#L142" name="L142">142</a><br/><a href="#L143" name="L143">143</a><br/><a href="#L144" name="L144">144</a><br/><a href="#L145" name="L145">145</a><br/><a href="#L146" name="L146">146</a><br/><a href="#L147" name="L147">147</a><br/><a href="#L148" name="L148">148</a><br/><a href="#L149" name="L149">149</a><br/><a href="#L150" name="L150">150</a><br/><a href="#L151" name="L151">151</a><br/><a href="#L152" name="L152">152</a><br/><a href="#L153" name="L153">153</a><br/><a href="#L154" name="L154">154</a><br/><a href="#L155" name="L155">155</a><br/><a href="#L156" name="L156">156</a><br/><a href="#L157" name="L157">157</a><br/><a href="#L158" name="L158">158</a><br/><a href="#L159" name="L159">159</a><br/><a href="#L160" name="L160">160</a><br/><a href="#L161" name="L161">161</a><br/><a href="#L162" name="L162">162</a><br/><a href="#L163" name="L163">163</a><br/><a href="#L164" name="L164">164</a><br/><a href="#L165" name="L165">165</a><br/><a href="#L166" name="L166">166</a><br/><a href="#L167" name="L167">167</a><br/><a href="#L168" name="L168">168</a><br/><a href="#L169" name="L169">169</a><br/><a href="#L170" name="L170">170</a><br/><a href="#L171" name="L171">171</a><br/><a href="#L172" name="L172">172</a><br/><a href="#L173" name="L173">173</a><br/><a href="#L174" name="L174">174</a><br/><a href="#L175" name="L175">175</a><br/><a href="#L176" name="L176">176</a><br/><a href="#L177" name="L177">177</a><br/><a href="#L178" name="L178">178</a><br/><a href="#L179" name="L179">179</a><br/><a href="#L180" name="L180">180</a><br/><a href="#L181" name="L181">181</a><br/><a href="#L182" name="L182">182</a><br/><a href="#L183" name="L183">183</a><br/><a href="#L184" name="L184">184</a><br/><a href="#L185" name="L185">185</a><br/><a href="#L186" name="L186">186</a><br/><a href="#L187" name="L187">187</a><br/><a href="#L188" name="L188">188</a><br/><a href="#L189" name="L189">189</a><br/><a href="#L190" name="L190">190</a><br/><a href="#L191" name="L191">191</a><br/><a href="#L192" name="L192">192</a><br/><a href="#L193" name="L193">193</a><br/><a href="#L194" name="L194">194</a><br/><a href="#L195" name="L195">195</a><br/><a href="#L196" name="L196">196</a><br/><a href="#L197" name="L197">197</a><br/><a href="#L198" name="L198">198</a><br/><a href="#L199" name="L199">199</a><br/><a href="#L200" name="L200">200</a><br/><a href="#L201" name="L201">201</a><br/><a href="#L202" name="L202">202</a><br/><a href="#L203" name="L203">203</a><br/><a href="#L204" name="L204">204</a><br/><a href="#L205" name="L205">205</a><br/><a href="#L206" name="L206">206</a><br/><a href="#L207" name="L207">207</a><br/><a href="#L208" name="L208">208</a><br/><a href="#L209" name="L209">209</a><br/><a href="#L210" name="L210">210</a><br/><a href="#L211" name="L211">211</a><br/><a href="#L212" name="L212">212</a><br/><a href="#L213" name="L213">213</a><br/><a href="#L214" name="L214">214</a><br/><a href="#L215" name="L215">215</a><br/><a href="#L216" name="L216">216</a><br/><a href="#L217" name="L217">217</a><br/><a href="#L218" name="L218">218</a><br/><a href="#L219" name="L219">219</a><br/><a href="#L220" name="L220">220</a><br/><a href="#L221" name="L221">221</a><br/><a href="#L222" name="L222">222</a><br/><a href="#L223" name="L223">223</a><br/><a href="#L224" name="L224">224</a><br/><a href="#L225" name="L225">225</a><br/><a href="#L226" name="L226">226</a><br/><a href="#L227" name="L227">227</a><br/><a href="#L228" name="L228">228</a><br/><a href="#L229" name="L229">229</a><br/><a href="#L230" name="L230">230</a><br/><a href="#L231" name="L231">231</a><br/><a href="#L232" name="L232">232</a><br/><a href="#L233" name="L233">233</a><br/><a href="#L234" name="L234">234</a><br/><a href="#L235" name="L235">235</a><br/><a href="#L236" name="L236">236</a><br/><a href="#L237" name="L237">237</a><br/><a href="#L238" name="L238">238</a><br/><a href="#L239" name="L239">239</a><br/><a href="#L240" name="L240">240</a><br/><a href="#L241" name="L241">241</a><br/><a href="#L242" name="L242">242</a><br/><a href="#L243" name="L243">243</a><br/><a href="#L244" name="L244">244</a><br/><a href="#L245" name="L245">245</a><br/><a href="#L246" name="L246">246</a><br/><a href="#L247" name="L247">247</a><br/><a href="#L248" name="L248">248</a><br/><a href="#L249" name="L249">249</a><br/><a href="#L250" name="L250">250</a><br/><a href="#L251" name="L251">251</a><br/><a href="#L252" name="L252">252</a><br/><a href="#L253" name="L253">253</a><br/><a href="#L254" name="L254">254</a><br/><a href="#L255" name="L255">255</a><br/><a href="#L256" name="L256">256</a><br/><a href="#L257" name="L257">257</a><br/><a href="#L258" name="L258">258</a><br/><a href="#L259" name="L259">259</a><br/><a href="#L260" name="L260">260</a><br/><a href="#L261" name="L261">261</a><br/><a href="#L262" name="L262">262</a><br/><a href="#L263" name="L263">263</a><br/><a href="#L264" name="L264">264</a><br/><a href="#L265" name="L265">265</a><br/><a href="#L266" name="L266">266</a><br/><a href="#L267" name="L267">267</a><br/><a href="#L268" name="L268">268</a><br/><a href="#L269" name="L269">269</a><br/><a href="#L270" name="L270">270</a><br/><a href="#L271" name="L271">271</a><br/><a href="#L272" name="L272">272</a><br/><a href="#L273" name="L273">273</a><br/><a href="#L274" name="L274">274</a><br/><a href="#L275" name="L275">275</a><br/><a href="#L276" name="L276">276</a><br/><a href="#L277" name="L277">277</a><br/><a href="#L278" name="L278">278</a><br/><a href="#L279" name="L279">279</a><br/><a href="#L280" name="L280">280</a><br/><a href="#L281" name="L281">281</a><br/><a href="#L282" name="L282">282</a><br/><a href="#L283" name="L283">283</a><br/><a href="#L284" name="L284">284</a><br/><a href="#L285" name="L285">285</a><br/><a href="#L286" name="L286">286</a><br/><a href="#L287" name="L287">287</a><br/><a href="#L288" name="L288">288</a><br/><a href="#L289" name="L289">289</a><br/><a href="#L290" name="L290">290</a><br/><a href="#L291" name="L291">291</a><br/><a href="#L292" name="L292">292</a><br/><a href="#L293" name="L293">293</a><br/><a href="#L294" name="L294">294</a><br/><a href="#L295" name="L295">295</a><br/><a href="#L296" name="L296">296</a><br/><a href="#L297" name="L297">297</a><br/><a href="#L298" name="L298">298</a><br/><a href="#L299" name="L299">299</a><br/><a href="#L300" name="L300">300</a><br/><a href="#L301" name="L301">301</a><br/><a href="#L302" name="L302">302</a><br/><a href="#L303" name="L303">303</a><br/><a href="#L304" name="L304">304</a><br/><a href="#L305" name="L305">305</a><br/><a href="#L306" name="L306">306</a><br/><a href="#L307" name="L307">307</a><br/><a href="#L308" name="L308">308</a><br/><a href="#L309" name="L309">309</a><br/><a href="#L310" name="L310">310</a><br/><a href="#L311" name="L311">311</a><br/><a href="#L312" name="L312">312</a><br/><a href="#L313" name="L313">313</a><br/><a href="#L314" name="L314">314</a><br/><a href="#L315" name="L315">315</a><br/><a href="#L316" name="L316">316</a><br/><a href="#L317" name="L317">317</a><br/><a href="#L318" name="L318">318</a><br/><a href="#L319" name="L319">319</a><br/><a href="#L320" name="L320">320</a><br/><a href="#L321" name="L321">321</a><br/><a href="#L322" name="L322">322</a><br/><a href="#L323" name="L323">323</a><br/><a href="#L324" name="L324">324</a><br/><a href="#L325" name="L325">325</a><br/><a href="#L326" name="L326">326</a><br/><a href="#L327" name="L327">327</a><br/><a href="#L328" name="L328">328</a><br/><a href="#L329" name="L329">329</a><br/><a href="#L330" name="L330">330</a><br/><a href="#L331" name="L331">331</a><br/><a href="#L332" name="L332">332</a><br/><a href="#L333" name="L333">333</a><br/><a href="#L334" name="L334">334</a><br/><a href="#L335" name="L335">335</a><br/><a href="#L336" name="L336">336</a><br/><a href="#L337" name="L337">337</a><br/><a href="#L338" name="L338">338</a><br/><a href="#L339" name="L339">339</a><br/><a href="#L340" name="L340">340</a><br/><a href="#L341" name="L341">341</a><br/><a href="#L342" name="L342">342</a><br/><a href="#L343" name="L343">343</a><br/><a href="#L344" name="L344">344</a><br/><a href="#L345" name="L345">345</a><br/><a href="#L346" name="L346">346</a><br/><a href="#L347" name="L347">347</a><br/><a href="#L348" name="L348">348</a><br/><a href="#L349" name="L349">349</a><br/><a href="#L350" name="L350">350</a><br/><a href="#L351" name="L351">351</a><br/><a href="#L352" name="L352">352</a><br/><a href="#L353" name="L353">353</a><br/><a href="#L354" name="L354">354</a><br/><a href="#L355" name="L355">355</a><br/><a href="#L356" name="L356">356</a><br/><a href="#L357" name="L357">357</a><br/><a href="#L358" name="L358">358</a><br/><a href="#L359" name="L359">359</a><br/><a href="#L360" name="L360">360</a><br/><a href="#L361" name="L361">361</a><br/><a href="#L362" name="L362">362</a><br/><a href="#L363" name="L363">363</a><br/><a href="#L364" name="L364">364</a><br/><a href="#L365" name="L365">365</a><br/><a href="#L366" name="L366">366</a><br/><a href="#L367" name="L367">367</a><br/><a href="#L368" name="L368">368</a><br/><a href="#L369" name="L369">369</a><br/><a href="#L370" name="L370">370</a><br/><a href="#L371" name="L371">371</a><br/><a href="#L372" name="L372">372</a><br/><a href="#L373" name="L373">373</a><br/><a href="#L374" name="L374">374</a><br/><a href="#L375" name="L375">375</a><br/><a href="#L376" name="L376">376</a><br/><a href="#L377" name="L377">377</a><br/><a href="#L378" name="L378">378</a><br/><a href="#L379" name="L379">379</a><br/><a href="#L380" name="L380">380</a><br/><a href="#L381" name="L381">381</a><br/><a href="#L382" name="L382">382</a><br/><a href="#L383" name="L383">383</a><br/><a href="#L384" name="L384">384</a><br/><a href="#L385" name="L385">385</a><br/><a href="#L386" name="L386">386</a><br/><a href="#L387" name="L387">387</a><br/><a href="#L388" name="L388">388</a><br/><a href="#L389" name="L389">389</a><br/><a href="#L390" name="L390">390</a><br/><a href="#L391" name="L391">391</a><br/><a href="#L392" name="L392">392</a><br/><a href="#L393" name="L393">393</a><br/><a href="#L394" name="L394">394</a><br/><a href="#L395" name="L395">395</a><br/><a href="#L396" name="L396">396</a><br/><a href="#L397" name="L397">397</a><br/><a href="#L398" name="L398">398</a><br/><a href="#L399" name="L399">399</a><br/><a href="#L400" name="L400">400</a><br/></pre>
						</div>
					</td>
					<td valign="top" onmouseup="javascript:LogReuse();">
						<div id="CodeDiv">
							<pre><span class='c'>/**
    Copyright (C) 2002-2003  Together

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/</span>
<span class='k'>package</span> <a class='r'>org</a>.<a class='r'>webdocwf</a>.<a class='r'>util</a>.<a class='r'>loader</a>;

<span class='k'>import</span> <a class='r'>java</a>.<a class='r'>io</a>.*;
<span class='k'>import</span> <a class='r'>java</a>.<a class='r'>util</a>.*;
<span class='k'>import</span> <a class='r'>java</a>.<a class='r'>sql</a>.<a class='r'>Statement</a>;

<span class='c'>/**
 * Class is used for parsing sql statements.
 *
 * @author     Zoran Milakovic
 */</span>
<span class='k'>public</span> <span class='k'>class</span> <a class='r'>SqlParser</a> {

  <span class='k'>public</span> <span class='k'>static</span> <span class='k'>final</span> <a class='r'>String</a> <a class='r'>INSERT</a> = <span class='str'>&quot;insert&quot;</span>;
  <span class='k'>public</span> <span class='k'>static</span> <span class='k'>final</span> <a class='r'>String</a> <a class='r'>UPDATE</a> = <span class='str'>&quot;update&quot;</span>;
  <span class='k'>public</span> <span class='k'>static</span> <span class='k'>final</span> <a class='r'>String</a> <a class='r'>SELECT</a> = <span class='str'>&quot;select&quot;</span>;

  <span class='k'>private</span> <span class='k'>static</span> <span class='k'>final</span> <a class='r'>String</a> <a class='r'>QUOTE_ESCAPE</a> = <span class='str'>&quot;''&quot;</span>;
  <span class='k'>private</span> <span class='k'>static</span> <span class='k'>final</span> <a class='r'>String</a> <a class='r'>COMMA_ESCAPE</a> = <span class='str'>&quot;~#####1~&quot;</span>;


  <span class='k'>private</span> <a class='r'>ArrayList</a> <a class='r'>binaryStreamObjectList</a> = <span class='k'>new</span> <a class='r'>ArrayList</a>();

  <span class='k'>public</span> <a class='r'>String</a> <a class='r'>tableName</a>;

  <span class='k'>public</span> <a class='r'>String</a> <a class='r'>whereStatement</a>;

  <span class='k'>public</span> <a class='r'>String</a> <a class='r'>sqlType</a>;

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>columnNames</a>;

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>columnValues</a>;

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>columnWhereNames</a>;

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>columnWhereValues</a>;

  <span class='c'>/**
   *Gets the tableName attribute of the SqlParser object
   *
   * @return    The tableName value
   * @since
   */</span>
  <span class='k'>public</span> <a class='r'>String</a> <a class='r'>getTableName</a>() {
    <span class='k'>return</span> <a class='r'>tableName</a>;
  }

  <span class='c'>/**
   * Gets the columnNames attribute of the SqlParser object
   *
   * @return    The columnNames value
   * @since
   */</span>
  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>getColumnNames</a>() {
    <span class='k'>return</span> <a class='r'>columnNames</a>;
  }

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>getWhereColumnNames</a>() {
    <span class='k'>return</span> <a class='r'>columnWhereNames</a>;
  }

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>getWhereColumnValues</a>() {
    <span class='k'>return</span> <a class='r'>columnWhereValues</a>;
  }

  <span class='k'>public</span> <a class='r'>String</a>[] <a class='r'>getColumnValues</a>() {
    <span class='k'>return</span> <a class='r'>columnValues</a>;
  }

  <span class='c'>/**
   * Parse sql statement.
   *
   * @param sql defines SQL statement
   * @exception  Exception  Description of Exception
   * @since
   */</span>
  <span class='k'>public</span> <span class='k'>void</span> <a class='r'>parse</a>(<a class='r'>String</a> <a class='r'>sql</a>) <span class='k'>throws</span> <a class='r'>Exception</a> {
    <a class='r'>sql</a> = <a class='r'>sql</a>.<a class='r'>trim</a>();
    <a class='r'>tableName</a> = <span class='k'>null</span>;
    <a class='r'>columnNames</a> = <span class='k'>new</span> <a class='r'>String</a>[0];
    <a class='r'>columnValues</a> = <span class='k'>new</span> <a class='r'>String</a>[0];
    <a class='r'>columnWhereNames</a> = <span class='k'>new</span> <a class='r'>String</a>[0];
    <a class='r'>columnWhereValues</a> = <span class='k'>new</span> <a class='r'>String</a>[0];
    <a class='r'>whereStatement</a> = <span class='k'>null</span>;
    <a class='r'>sqlType</a> = <span class='k'>null</span>;
    <a class='r'>sql</a> = <a class='r'>sql</a>.<a class='r'>trim</a>();

<span class='c'>//replace comma(,) in values between quotes(')</span>
    <a class='r'>StringTokenizer</a> <a class='r'>tokQuote</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>sql</a>.<a class='r'>toString</a>(), <span class='str'>&quot;'&quot;</span>, <span class='k'>true</span>);
    <a class='r'>StringBuffer</a> <a class='r'>sb</a> = <span class='k'>new</span> <a class='r'>StringBuffer</a>();
    <span class='k'>boolean</span> <a class='r'>openParent1</a> = <span class='k'>false</span>;
    <span class='k'>while</span> (<a class='r'>tokQuote</a>.<a class='r'>hasMoreTokens</a>()) {
      <a class='r'>String</a> <a class='r'>next</a> = <a class='r'>tokQuote</a>.<a class='r'>nextToken</a>();
      <span class='k'>if</span> (<a class='r'>openParent1</a>)
        <a class='r'>next</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>next</a>, <span class='str'>&quot;,&quot;</span>, <a class='r'>COMMA_ESCAPE</a>);
      <a class='r'>sb</a>.<a class='r'>append</a>(<a class='r'>next</a>);
      <span class='k'>if</span> (<a class='r'>next</a>.<a class='r'>equalsIgnoreCase</a>(<span class='str'>&quot;'&quot;</span>)) {
        <span class='k'>if</span> (<a class='r'>openParent1</a> == <span class='k'>true</span>)
          <a class='r'>openParent1</a> = <span class='k'>false</span>;
        <span class='k'>else</span>
          <a class='r'>openParent1</a> = <span class='k'>true</span>;
      }
    }
<span class='c'>//END replacement</span>
    <a class='r'>sql</a> = <a class='r'>sb</a>.<a class='r'>toString</a>();
    <a class='r'>String</a> <a class='r'>upperSql</a> = <a class='r'>sql</a>.<a class='r'>toUpperCase</a>();


<span class='c'>//handle unsupported statements</span>
    <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>startsWith</a>(<span class='str'>&quot;ALTER &quot;</span>))
      <span class='k'>throw</span> <span class='k'>new</span> <a class='r'>Exception</a>(<span class='str'>&quot;ALTER TABLE statements are not supported.&quot;</span>);
    <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>startsWith</a>(<span class='str'>&quot;DROP &quot;</span>))
      <span class='k'>throw</span> <span class='k'>new</span> <a class='r'>Exception</a>(<span class='str'>&quot;DROP statements are not supported.&quot;</span>);

<span class='c'>//SELECT</span>
    <span class='k'>if</span> ( <a class='r'>upperSql</a>.<a class='r'>startsWith</a>(<span class='str'>&quot;SELECT &quot;</span>) ) {
      <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot; FROM &quot;</span>) == -1) {
        <span class='k'>throw</span> <span class='k'>new</span> <a class='r'>Exception</a>(<span class='str'>&quot;Malformed SQL. Missing FROM statement.&quot;</span>);
      }

      <a class='r'>sqlType</a> = <a class='r'>SELECT</a>;
      <span class='k'>int</span> <a class='r'>fromPos</a> = <a class='r'>upperSql</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot; FROM &quot;</span>);
      <span class='k'>int</span> <a class='r'>wherePos</a> = <a class='r'>upperSql</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot; WHERE &quot;</span>);
      <span class='k'>if</span> (<a class='r'>wherePos</a> == -1)
        <a class='r'>tableName</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>fromPos</a> + 6).<a class='r'>trim</a>();
      <span class='k'>else</span>
        <a class='r'>tableName</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>fromPos</a> + 6, <a class='r'>wherePos</a>).<a class='r'>trim</a>();

      <a class='r'>Vector</a> <a class='r'>cols</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
      <a class='r'>StringTokenizer</a> <a class='r'>tokenizer</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>upperSql</a>.<a class='r'>substring</a>(7,
          <a class='r'>fromPos</a>), <span class='str'>&quot;,&quot;</span>);

      <span class='k'>while</span> (<a class='r'>tokenizer</a>.<a class='r'>hasMoreTokens</a>()) {
        <a class='r'>cols</a>.<a class='r'>add</a>(<a class='r'>tokenizer</a>.<a class='r'>nextToken</a>().<a class='r'>trim</a>());
      }

      <a class='r'>columnNames</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>cols</a>.<a class='r'>size</a>()];
      <a class='r'>cols</a>.<a class='r'>copyInto</a>(<a class='r'>columnNames</a>);
      <span class='k'>if</span> (<a class='r'>wherePos</a> != -1) {
        <a class='r'>String</a> <a class='r'>strWhere</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>wherePos</a> + 7);
        <a class='r'>Vector</a> <a class='r'>whereCols</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
        <a class='r'>Vector</a> <a class='r'>whereValues</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
        <a class='r'>StringTokenizer</a> <a class='r'>tokenizerWhere</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>strWhere</a>, <span class='str'>&quot;,&quot;</span>);

        <span class='k'>while</span> (<a class='r'>tokenizerWhere</a>.<a class='r'>hasMoreTokens</a>()) {
          <a class='r'>String</a> <a class='r'>strToken</a> = <a class='r'>tokenizerWhere</a>.<a class='r'>nextToken</a>();
          <span class='k'>if</span> (<a class='r'>strToken</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>) != -1) {
            <a class='r'>String</a> <a class='r'>temp</a> = <a class='r'>strToken</a>;
            <span class='k'>int</span> <a class='r'>andPos</a> = 0;
            <a class='r'>out</a>:
            <span class='k'>do</span> {
              <a class='r'>andPos</a> = <a class='r'>temp</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>);
              <a class='r'>String</a> <a class='r'>strTokenAdd</a>;
              <span class='k'>if</span> (<a class='r'>andPos</a> != -1)
                <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>substring</a>(0, <a class='r'>andPos</a>).<a class='r'>trim</a>();
              <span class='k'>else</span>
                <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>trim</a>();
              <span class='k'>int</span> <a class='r'>delimiter2</a> = <a class='r'>strTokenAdd</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
              <span class='k'>if</span> (<a class='r'>delimiter2</a> != -1) {
                <a class='r'>String</a> <a class='r'>valueAdd</a> = <a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(<a class='r'>delimiter2</a> + 1).<a class='r'>trim</a>();
                <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>valueAdd</a>);
                <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter2</a>).<a class='r'>trim</a>());
                <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
                <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
                <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>valueAdd</a>);
              }
              <span class='k'>else</span> {
                <span class='k'>int</span> <a class='r'>delimiter3</a> = <a class='r'>strTokenAdd</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
                <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter3</a>).<a class='r'>trim</a>());
                <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
              }
              <a class='r'>temp</a> = <a class='r'>temp</a>.<a class='r'>substring</a>(<a class='r'>andPos</a> + 5);
              <span class='k'>if</span> (<a class='r'>temp</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>) == -1) {
                <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>trim</a>();
                <span class='k'>int</span> <a class='r'>delimiter4</a> = <a class='r'>strTokenAdd</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
                <span class='k'>if</span> (<a class='r'>delimiter4</a> != -1) {
                  <a class='r'>String</a> <a class='r'>valueAdd</a> = <a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(<a class='r'>delimiter4</a> + 1).<a class='r'>trim</a>();
                  <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>valueAdd</a>);
                  <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter4</a>).<a class='r'>trim</a>());
                  <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
                  <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
                  <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>valueAdd</a>);
                }
                <span class='k'>else</span> {
                  <span class='k'>int</span> <a class='r'>delimiter3</a> = <a class='r'>strTokenAdd</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
                  <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter3</a>).<a class='r'>trim</a>());
                  <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
                }
                <span class='k'>break</span> <a class='r'>out</a>;
              }

            }
            <span class='k'>while</span> (<span class='k'>true</span>);

          }
          <span class='k'>else</span> {
            <span class='k'>int</span> <a class='r'>delimiter</a> = <a class='r'>strToken</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
            <span class='k'>if</span> (<a class='r'>delimiter</a> != -1) {
              <a class='r'>String</a> <a class='r'>value</a> = <a class='r'>strToken</a>.<a class='r'>substring</a>(<a class='r'>delimiter</a> + 1).<a class='r'>trim</a>();
              <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>value</a>);
              <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strToken</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter</a>).<a class='r'>trim</a>());
              <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
              <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
              <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>value</a>);
            }
            <span class='k'>else</span> {
              <span class='k'>int</span> <a class='r'>delimiter1</a> = <a class='r'>strToken</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
              <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strToken</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter1</a>).<a class='r'>trim</a>());
              <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
            }
          }
        }
        <a class='r'>columnWhereNames</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>whereCols</a>.<a class='r'>size</a>()];
        <a class='r'>columnWhereValues</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>whereValues</a>.<a class='r'>size</a>()];
        <a class='r'>whereCols</a>.<a class='r'>copyInto</a>(<a class='r'>columnWhereNames</a>);
        <a class='r'>whereValues</a>.<a class='r'>copyInto</a>(<a class='r'>columnWhereValues</a>);
      }
    }
<span class='c'>//INSERT</span>
    <span class='k'>if</span> ( <a class='r'>upperSql</a>.<a class='r'>startsWith</a>(<span class='str'>&quot;INSERT &quot;</span>) ) {
      <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot; VALUES&quot;</span>) == -1) {
          <span class='k'>throw</span> <span class='k'>new</span> <a class='r'>Exception</a>(<span class='str'>&quot;Malformed SQL. Missing VALUES statement.&quot;</span>);
        }
        <a class='r'>sqlType</a> = <a class='r'>INSERT</a>;
        <span class='k'>int</span> <a class='r'>intoPos</a> = 0;
        <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot; INTO &quot;</span>) != -1)
          <a class='r'>intoPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot; INTO &quot;</span>) + 6;
        <span class='k'>else</span>
          <a class='r'>intoPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;INSERT &quot;</span>) + 7;
        <span class='k'>int</span> <a class='r'>bracketPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;(&quot;</span>);
        <span class='k'>int</span> <a class='r'>lastBracketPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;)&quot;</span>);
        <a class='r'>tableName</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>intoPos</a>, <a class='r'>bracketPos</a>).<a class='r'>trim</a>();

        <a class='r'>Vector</a> <a class='r'>cols</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
        <a class='r'>StringTokenizer</a> <a class='r'>tokenizer</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>upperSql</a>.<a class='r'>substring</a>(
            <a class='r'>bracketPos</a> + 1, <a class='r'>lastBracketPos</a>), <span class='str'>&quot;,&quot;</span>);
        <span class='k'>while</span> (<a class='r'>tokenizer</a>.<a class='r'>hasMoreTokens</a>()) {
          <a class='r'>cols</a>.<a class='r'>add</a>(<a class='r'>tokenizer</a>.<a class='r'>nextToken</a>().<a class='r'>trim</a>());
        }
        <a class='r'>columnNames</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>cols</a>.<a class='r'>size</a>()];
        <a class='r'>cols</a>.<a class='r'>copyInto</a>(<a class='r'>columnNames</a>);

        <span class='k'>int</span> <a class='r'>valuesPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;VALUES&quot;</span>);
        <a class='r'>String</a> <a class='r'>endStatement</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>valuesPos</a> + 6).<a class='r'>trim</a>();
        <a class='r'>bracketPos</a> = <a class='r'>endStatement</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;(&quot;</span>);
        <a class='r'>lastBracketPos</a> = <a class='r'>endStatement</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot;)&quot;</span>);
        <a class='r'>Vector</a> <a class='r'>values</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
        <a class='r'>StringTokenizer</a> <a class='r'>tokenizer2</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>endStatement</a>.<a class='r'>substring</a>(
            <a class='r'>bracketPos</a> + 1, <a class='r'>lastBracketPos</a>), <span class='str'>&quot;,&quot;</span>);
        <span class='k'>while</span> (<a class='r'>tokenizer2</a>.<a class='r'>hasMoreTokens</a>()) {
          <a class='r'>String</a> <a class='r'>value</a> = <a class='r'>tokenizer2</a>.<a class='r'>nextToken</a>().<a class='r'>trim</a>();
          <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>value</a>);
          <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
          <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
          <a class='r'>values</a>.<a class='r'>add</a>(<a class='r'>value</a>);
        }
        <a class='r'>columnValues</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>values</a>.<a class='r'>size</a>()];
        <a class='r'>values</a>.<a class='r'>copyInto</a>(<a class='r'>columnValues</a>);
    }


<span class='c'>//UPDATE</span>
    <span class='k'>if</span> ( <a class='r'>upperSql</a>.<a class='r'>startsWith</a>(<span class='str'>&quot;UPDATE &quot;</span>) ) {
      <span class='k'>if</span> (<a class='r'>upperSql</a>.<a class='r'>lastIndexOf</a>(<span class='str'>&quot; SET &quot;</span>) == -1)
            <span class='k'>throw</span> <span class='k'>new</span> <a class='r'>Exception</a>(<span class='str'>&quot;Malformed SQL. Missing SET statement.&quot;</span>);
          <a class='r'>sqlType</a> = <a class='r'>UPDATE</a>;
          <span class='k'>int</span> <a class='r'>updatePos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;UPDATE&quot;</span>);
          <span class='k'>int</span> <a class='r'>setPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot; SET &quot;</span>);
          <span class='k'>int</span> <a class='r'>equalPos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
          <span class='k'>int</span> <a class='r'>wherePos</a> = <a class='r'>upperSql</a>.<a class='r'>indexOf</a>(<span class='str'>&quot; WHERE &quot;</span>);
          <a class='r'>tableName</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>updatePos</a> + 6, <a class='r'>setPos</a>).<a class='r'>trim</a>();

          <a class='r'>String</a> <a class='r'>setString</a> = <span class='str'>&quot;&quot;</span>;
          <span class='k'>if</span> (<a class='r'>wherePos</a> != -1)
            <a class='r'>setString</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>setPos</a> + 5, <a class='r'>wherePos</a>);
          <span class='k'>else</span>
            <a class='r'>setString</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>setPos</a> + 5, <a class='r'>sql</a>.<a class='r'>length</a>());
          <a class='r'>StringTokenizer</a> <a class='r'>tokenizerSet</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>setString</a>, <span class='str'>&quot;,&quot;</span>);
          <a class='r'>Vector</a> <a class='r'>setNames</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
          <a class='r'>Vector</a> <a class='r'>setValues</a> = <span class='k'>new</span> <a class='r'>Vector</a>();

          <span class='k'>while</span> (<a class='r'>tokenizerSet</a>.<a class='r'>hasMoreTokens</a>()) {
            <a class='r'>String</a> <a class='r'>strToken</a> = <a class='r'>tokenizerSet</a>.<a class='r'>nextToken</a>();
            <span class='k'>int</span> <a class='r'>delimiter</a> = <a class='r'>strToken</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
            <a class='r'>setNames</a>.<a class='r'>add</a>(<a class='r'>strToken</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter</a>).<a class='r'>trim</a>());
            <a class='r'>String</a> <a class='r'>value</a> = <a class='r'>strToken</a>.<a class='r'>substring</a>(<a class='r'>delimiter</a> + 1).<a class='r'>trim</a>();
            <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>value</a>);
            <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
            <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
            <a class='r'>setValues</a>.<a class='r'>add</a>(<a class='r'>value</a>);
          }

          <a class='r'>columnNames</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>setNames</a>.<a class='r'>size</a>()];
          <a class='r'>columnValues</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>setValues</a>.<a class='r'>size</a>()];
          <a class='r'>setNames</a>.<a class='r'>copyInto</a>(<a class='r'>columnNames</a>);
          <a class='r'>setValues</a>.<a class='r'>copyInto</a>(<a class='r'>columnValues</a>);
          <span class='k'>if</span> (<a class='r'>wherePos</a> != -1) {
            <a class='r'>String</a> <a class='r'>strWhere</a> = <a class='r'>sql</a>.<a class='r'>substring</a>(<a class='r'>wherePos</a> + 6).<a class='r'>trim</a>();
            <a class='r'>Vector</a> <a class='r'>whereCols</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
            <a class='r'>Vector</a> <a class='r'>whereValues</a> = <span class='k'>new</span> <a class='r'>Vector</a>();
            <a class='r'>StringTokenizer</a> <a class='r'>tokenizerWhere</a> = <span class='k'>new</span> <a class='r'>StringTokenizer</a>(<a class='r'>strWhere</a>, <span class='str'>&quot;,&quot;</span>);

            <span class='k'>while</span> (<a class='r'>tokenizerWhere</a>.<a class='r'>hasMoreTokens</a>()) {
              <a class='r'>String</a> <a class='r'>strToken</a> = <a class='r'>tokenizerWhere</a>.<a class='r'>nextToken</a>();
              <span class='k'>if</span> (<a class='r'>strToken</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>) != -1) {
                <a class='r'>String</a> <a class='r'>temp</a> = <a class='r'>strToken</a>;
                <span class='k'>int</span> <a class='r'>andPos</a> = 0;
                <a class='r'>out</a>:
                <span class='k'>do</span> {
                  <a class='r'>andPos</a> = <a class='r'>temp</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>);
                  <a class='r'>String</a> <a class='r'>strTokenAdd</a>;
                  <span class='k'>if</span> (<a class='r'>andPos</a> != -1)
                    <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>substring</a>(0, <a class='r'>andPos</a>).<a class='r'>trim</a>();
                  <span class='k'>else</span>
                    <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>trim</a>();
                  <span class='k'>int</span> <a class='r'>delimiter2</a> = <a class='r'>strTokenAdd</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
                  <span class='k'>if</span> (<a class='r'>delimiter2</a> != -1) {
                    <a class='r'>String</a> <a class='r'>valueAdd</a> = <a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(<a class='r'>delimiter2</a> + 1).<a class='r'>trim</a>();
                    <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>valueAdd</a>);
                    <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter2</a>).<a class='r'>trim</a>());
                    <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
                    <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
                    <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>valueAdd</a>);
                  }
                  <span class='k'>else</span> {
                    <span class='k'>int</span> <a class='r'>delimiter3</a> = <a class='r'>strTokenAdd</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
                    <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter3</a>).<a class='r'>trim</a>());
                    <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
                  }
                  <a class='r'>temp</a> = <a class='r'>temp</a>.<a class='r'>substring</a>(<a class='r'>andPos</a> + 5);
                  <span class='k'>if</span> (<a class='r'>temp</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; and &quot;</span>) == -1) {
                    <a class='r'>strTokenAdd</a> = <a class='r'>temp</a>.<a class='r'>trim</a>();
                    <span class='k'>int</span> <a class='r'>delimiter4</a> = <a class='r'>strTokenAdd</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
                    <span class='k'>if</span> (<a class='r'>delimiter4</a> != -1) {
                      <a class='r'>String</a> <a class='r'>valueAdd</a> = <a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(<a class='r'>delimiter4</a> + 1).
                          <a class='r'>trim</a>();
                      <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>valueAdd</a>);
                      <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter4</a>).<a class='r'>trim</a>());
                      <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
                      <a class='r'>valueAdd</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>valueAdd</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
                      <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>valueAdd</a>);
                    }
                    <span class='k'>else</span> {
                      <span class='k'>int</span> <a class='r'>delimiter3</a> = <a class='r'>strTokenAdd</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
                      <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strTokenAdd</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter3</a>).<a class='r'>trim</a>());
                      <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
                    }
                    <span class='k'>break</span> <a class='r'>out</a>;
                  }

                }
                <span class='k'>while</span> (<span class='k'>true</span>);

              }
              <span class='k'>else</span> {
                <span class='k'>int</span> <a class='r'>delimiter</a> = <a class='r'>strToken</a>.<a class='r'>indexOf</a>(<span class='str'>&quot;=&quot;</span>);
                <span class='k'>if</span> (<a class='r'>delimiter</a> != -1) {
                  <a class='r'>String</a> <a class='r'>value</a> = <a class='r'>strToken</a>.<a class='r'>substring</a>(<a class='r'>delimiter</a> + 1).<a class='r'>trim</a>();
                  <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>handleQuotedString</a>(<a class='r'>value</a>);
                  <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strToken</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter</a>).<a class='r'>trim</a>());
                  <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>COMMA_ESCAPE</a>, <span class='str'>&quot;,&quot;</span>);
                  <a class='r'>value</a> = <a class='r'>Utils</a>.<a class='r'>replaceAll</a>(<a class='r'>value</a>, <a class='r'>QUOTE_ESCAPE</a>, <span class='str'>&quot;'&quot;</span>);
                  <a class='r'>whereValues</a>.<a class='r'>add</a>(<a class='r'>value</a>);
                }
                <span class='k'>else</span> {
                  <span class='k'>int</span> <a class='r'>delimiter1</a> = <a class='r'>strToken</a>.<a class='r'>toLowerCase</a>().<a class='r'>indexOf</a>(<span class='str'>&quot; is &quot;</span>);
                  <a class='r'>whereCols</a>.<a class='r'>add</a>(<a class='r'>strToken</a>.<a class='r'>substring</a>(0, <a class='r'>delimiter1</a>).<a class='r'>trim</a>());
                  <a class='r'>whereValues</a>.<a class='r'>add</a>(<span class='k'>null</span>);
                }
              }
            }
            <a class='r'>columnWhereNames</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>whereCols</a>.<a class='r'>size</a>()];
            <a class='r'>columnWhereValues</a> = <span class='k'>new</span> <a class='r'>String</a>[<a class='r'>whereValues</a>.<a class='r'>size</a>()];
            <a class='r'>whereCols</a>.<a class='r'>copyInto</a>(<a class='r'>columnWhereNames</a>);
            <a class='r'>whereValues</a>.<a class='r'>copyInto</a>(<a class='r'>columnWhereValues</a>);
          }
    }

  }


}
</pre>
						</div>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>


<script type="text/javascript">
var jumpLine = "-1";
if(jumpLine && jumpLine != "-1" && !document.location.hash){
	if(document.attachEvent){
		document.attachEvent("onreadystatechange", function(){
			if(document.readyState != "complete") return;
			var numbers = document.all["kodeViewerLineNumbers"];
			var targetA = numbers.children.tags("a")[jumpLine - 1];
			targetA.scrollIntoView();
			document.body.scrollLeft = 0;
		});
	} else if(window.addEventListener){
		window.addEventListener("load", function(){
			document.location.replace(document.location + "#L" + jumpLine);
		}, false);
	}
}
	
var homeUrl = "/"; 
var projectID = "KC72R9RT8N3WZ6MV8V7M29QZ6A";
var sourceLanguage = "Java";
var IsLogged = false;

// only logs once
function LogReuse() {
	// dynamic image loading
	if(!IsLogged) {
		//alert("logging");
		var	fileImg	= new Image();
		var fileImgSrc = "/kv.aspx?fid=875376E771EE4511E298CB10723A5447A9D6D587&mode=cp";
		//alert("fileImgSrc = " + fileImgSrc);
		fileImg.src	= fileImgSrc;
		IsLogged = true;
	} else {
		//alert("already logged!");
	}
	return true;
}
</script>


            
        </div>
        
        
        <TABLE cellSpacing=10 cellPadding=0 width="100%" align=center 
  border=0><TBODY>
  
  <TR>
    <TD colSpan=2 align=left vAlign=center bgColor=#ffffff>
      <P align=center><A href="http://corp.koders.com/about/" class="k_footer">About Koders</A> | <A 
      href="http://corp.koders.com/resources" class="k_footer">Resources</A> | <A
   	  href="http://corp.koders.com/downloads/" class="k_footer">Downloads</A> | <A 
      href="http://corp.koders.com/support/overview/" class="k_footer">Support</A> | <A 
      href="http://www.blackducksoftware.com/" target="_blank" class="k_footer">Black Duck</A> | <A 
      href="http://corp.koders.com/terms-of-service/" class="k_footer">Terms of Service </A> | <A 
      href="http://corp.koders.com/DMCA/" class="k_footer">DMCA</A> | <A 
      href="http://corp.koders.com/privacy-policy/" class="k_footer">Privacy Policy</A> | <A 
      href="http://corp.koders.com/about#Contact" class="k_footer">Contact Us</A></P></TD></TR>
  <TR>
    <TD vAlign=center align=left bgColor=#ffffff colSpan=2>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
          <TD colSpan=2>
            <div align="center"><DIV id=k_copyright>
            <p>&copy;2012 Koders is a trademark of Black Duck Software, Inc. Black Duck, Know Your Code, Ohloh, and the Black Duck logo are registered trademarks of Black Duck Software, Inc. in the United States and other jurisdictions.  All other trademarks are the property of their respective holders.</p>
</DIV></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>



    

<script type="text/javascript">
//<![CDATA[
Sys.Application.initialize();
//]]>
</script>
</form>
    
    <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1450480-3");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</body>
</html>
